import React from 'react';
import img from '@/assets/images/user/choice_me.png';
import './chooseItem.less';
interface IProps {
  data: ISelectOption;
  isCheck: boolean;
  onCheck: (val: string) => void;
}
export default function ChooseItem({ data, isCheck, onCheck }: IProps) {
  return (
    <div className="chooseItem" onClick={() => onCheck(data.key)}>
      <div className="check">
        <img src={img} alt="" style={{ display: isCheck ? 'block' : 'none' }} />
      </div>
      <div className="opt">{data.key}</div>
      <div className="content">{data.value}</div>
    </div>
  );
}
